LockDisk is a CDev (control panel device) that changes your system disk (the one from which you boot your Macintosh) to read-only status. This can be handy in many ways:
• CD-ROM discs are read-only. You can test such things as Hypercard stacks to make sure that they run on read-only media.
• You can’t get a virus infection on a read-only disk.
• Kids can’t (logically) destroy your hard disk. No promises on physical efforts...
• Trade shows.
LockDisk cheats and goes behind the Finder’s back. Use it with a certain sense of caution. Poorly written programs get very upset if they are run on a read-only disk. They can crash.
When you are booting your system, LockDisk looks for a file named
file used by LockDisk cdev/init
in the System Folder. If this file exists, your system disk is locked. If the file doesn’t exist, nothing happens.
To change the behavior, open up the control panel and choose LockDisk. If you select “Lock”, the file mentioned above is created, and your system disk is locked. If you select “Unlock”, the file is deleted and the system disk is unlocked. This happens immediately; you don’t have to reboot to have it take effect.
Technoweenie explanation of what’s going on: LockDisk sets the vcbAtrb flag that indicates that the disk in question is hardware locked. Why don’t we allow you to lock & unlock other volumes? Because the INIT can’t handle it; at INIT time, only the system disk has been mounted, so it’s the only disk we can see.
The Finder may not notice that the status of the disk has changed until you do something like a “Get Info” on the disk.
Questions, comments, etc. should be directed electronically to:
blob@apple.com on Internet. (preferred)
BECHTEL1 on AppleLink.
Don’t call me, I’ll call you. This is not an Apple product, and Apple doesn’t know or care about this program. Leave them out of this.
In the future (not implemented yet): support disks other than the system disk, even though the lock will only be in effect until you reboot.